/*
 * @Author: fisher
 * @Date: 2024-02-13 16:33:12
 * @LastEditors: luthor luthor-li@qq.com
 * @LastEditTime: 2024-03-10 22:17:30
 * @FilePath: \allfront\src\router\index.js
 * @Description:
 */
import { createRouter, createWebHashHistory } from 'vue-router';
const routes = [
  {
    path: '/',
    redirect: '/login',
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('Modules/home/index.vue'), // 使用动态导入
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('Modules/login/index.vue'), // 使用动态导入
  },
  {
    path: '/map3d',
    name: 'map3d',
    component: () => import('Modules/cesium/index.vue'), // 使用动态导入
  },
  // 其余路由...
  {
    path: '/pixelstream/:token',
    name: 'pixelstream',
    component: () => import('Modules/pixelstream/index.vue'), // 使用动态导入
  },
  {
    path: '/cloud',
    name: 'cloud',
    component: () => import('Modules/cloud/index.vue'), // 使用动态导入
  },
];
const router = createRouter({
  history: createWebHashHistory(), // 使用哈希历史模式
  routes,
});
export default router;
